#define LED1	_LATE5
#define LED2	_LATE6
#define LED3	_LATE7
#define LED4	_LATG6
#define LED5	_LATG7
#define LED6	_LATG8
#define LED7	_LATG9
#define LED8	_LATB5
#define LED9	_LATB4
#define LED10	_LATB3
#define LED11	_LATB2
#define LED12	_LATB1
#define LED13	_LATB0
#define LED14	_LATB8
#define LED15	_LATB9
#define LED16	_LATB10
#define LED17	_LATB11
#define LED18	_LATB12
#define LED19	_LATB13
#define LED20	_LATB14
#define LED21	_LATB15
#define LED22	_LATF3
#define LED23	_LATD8
#define LED24	_LATD9
#define LED25	_LATD10
#define LED26	_LATD11
#define LED27	_LATD0
#define LED28	_LATD1
#define LED29	_LATD2
#define LED30	_LATD3
#define LED31	_LATD4
#define LED32	_LATD5
#define LED33	_LATD6
#define LED34	_LATD7
#define LED35	_LATF1
#define LED36	_LATE0
#define LED37	_LATE1
#define LED38	_LATE2
#define LED39	_LATE3
#define LED40	_LATE4

#define LEDtris1	_TRISE5
#define LEDtris2	_TRISE6
#define LEDtris3	_TRISE7
#define LEDtris4	_TRISG6
#define LEDtris5	_TRISG7
#define LEDtris6	_TRISG8
#define LEDtris7	_TRISG9
#define LEDtris8	_TRISB5
#define LEDtris9	_TRISB4
#define LEDtris10	_TRISB3
#define LEDtris11	_TRISB2
#define LEDtris12	_TRISB1
#define LEDtris13	_TRISB0
#define LEDtris14	_TRISB8
#define LEDtris15	_TRISB9
#define LEDtris16	_TRISB10
#define LEDtris17	_TRISB11
#define LEDtris18	_TRISB12
#define LEDtris19	_TRISB13
#define LEDtris20	_TRISB14
#define LEDtris21	_TRISB15
#define LEDtris22	_TRISF3
#define LEDtris23	_TRISD8
#define LEDtris24	_TRISD9
#define LEDtris25	_TRISD10
#define LEDtris26	_TRISD11
#define LEDtris27	_TRISD0
#define LEDtris28	_TRISD1
#define LEDtris29	_TRISD2
#define LEDtris30	_TRISD3
#define LEDtris31	_TRISD4
#define LEDtris32	_TRISD5
#define LEDtris33	_TRISD6
#define LEDtris34	_TRISD7
#define LEDtris35	_TRISF1
#define LEDtris36	_TRISE0
#define LEDtris37	_TRISE1
#define LEDtris38	_TRISE2
#define LEDtris39	_TRISE3
#define LEDtris40	_TRISE4